<div class="row">
<form class="form-horizontal col-md-6" action="" method="post"  enctype="multipart/form-data">
  <legend>Add New Blog</legend>
  <div class="form-group">
    <label for="catid" class="col-sm-4 control-label">Category :</label>
    <div class="col-sm-8">
		<?php
        $sql_category = "select * from inancm_category order by cat_id";
		$data_category = $inancm->select_db($sql_category);
        if (!isset($catid)){ $catid = 1; }			
        ?>   
        <select id="form-s-s" name="catid" class="form-control">
            <?php foreach($data_category as $val) {  					
                echo '<option value="'.$val['cat_id'].'">'.$val['cat_name'].'</option>';
            }
            ?>       
        </select>
    </div>
  </div>
  <div class="form-group">
    <label for="file" class="col-sm-4 control-label">Image :</label>
    <div class="col-sm-8">
      <input name="file" type="file" required>
      <span class="help-block" style="color:#F30;">437 x 126</span>
    </div>
  </div>
  <div class="form-group">
    <label for="btitle" class="col-sm-4 control-label">Title :</label>
    <div class="col-sm-8">
      <input type="text" name="btitle" placeholder="Title" class="form-control" required>
    </div>
  </div>
  <div class="form-group">
    <label for="btag" class="col-sm-4 control-label">Tag :</label>
    <div class="col-sm-8">
      <input type="text" name="btag" placeholder="Tag" class="form-control" required>
    </div>
  </div>
  <div class="form-group">
    <label for="bpost" class="col-sm-4 control-label">Post by :</label>
    <div class="col-sm-8">
      <input type="text" name="bpost" placeholder="Post by" class="form-control" required>
    </div>
  </div>
  
  <div class="form-group">
    <label for="bdes" class="col-sm-4 control-label">Description :</label>
    <div class="col-sm-8">
      <textarea type="text" name="bdes" placeholder="Post by" class="form-control"></textarea>
    </div>
  </div>
  
  <div class="form-group">
    <label for="bdetail" class="col-sm-4 control-label">Detail :</label>
    <div class="col-sm-8">
      <textarea type="text" name="bdetail" placeholder="Detail" class="form-control"></textarea>
    </div>
  </div>
  
  <div class="form-group">
    <div class="col-sm-offset-6 col-sm-10">
      <input type="hidden" name="thisact" value="addsave">
      <button type="submit" class="btn btn-primary">Save</button>
      <button class="btn btn-default" type="button" onClick="reloadPage();">Cancel</button>
    </div>
  </div>
</form>

</div>
